package com.yc.dao;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;


/**
 * 读取配置文件
 * 南华   木卓子
 * @author May 16, 2021
 * Email: 1638982163@qq.com
 */
public class ReadConfig extends Properties{
	
	private static final long serialVersionUID = -2428229012621316896L;
	private static ReadConfig instance = new ReadConfig();
	
	private ReadConfig() {
		try(InputStream is = this.getClass().getClassLoader().getResourceAsStream("db.properties")) {
			this.load(is);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	

	public static ReadConfig getInstance() {
		
		return instance;
	}
	
}
